#include "util.h"

wordvec split (const string &line, const string &delimiters) {
   wordvec words;
   size_t end = 0;

   // Loop over the string, splitting out words, and for each word
   // thus found, append it to the output wordvec.
   for (;;) {
      size_t start = line.find_first_not_of (delimiters, end);
      if (start == string::npos) break;
      end = line.find_first_of (delimiters, start);
      words.push_back (line.substr (start, end - start));
   }
   return words;
}

vec3 angleConvert(float angle)
{
	vec3 vec;
	vec.vx = sin(angle * 3.1415 / 180);
	vec.vz = cos(angle * 3.1415 / 180);
	vec.vy = 0;

	return vec;
}